Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ make account upgreadable #78

Merged
merged 2 commits into from
Apr 2, 2024
Merged

✨ make account upgreadable #78

merged 2 commits into from
Apr 2, 2024

Conversation

qd-qd
Copy link
Member

@qd-qd qd-qd commented Apr 2, 2024

Implement the UUPS upgradeability pattern for the Account contract. This commit also reorg account functions and rename the VERSION function to version to be more consistent with the rest of system.

@qd-qd qd-qd self-assigned this Apr 2, 2024
Copy link

github-actions bot commented Apr 2, 2024

Changes to gas cost

Generated at commit: 92ab24029d9b23c7eff1320f5a8868e5c3e9e1fa, compared to commit: 64c719a20b658141d1229db47f1e2eb4535d8352

🧾 Summary (20% most significant diffs)

Contract Method Avg (+/-) %
ERC1967Proxy execute
factory
getSigner
-35,164 ✅
+1,669 ❌
+431 ❌
-54.53%
+228.63%
+8.95%
SmartAccount execute
getSigner
-45,045 ✅
+422 ❌
-87.93%
+12.31%
AccountFactory createAndInitAccount +5,768 ❌ +15.02%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
ERC1967Proxy 0 (0) addWebAuthnP256R1Signer
execute
exposed_validateCreationSignature
extractSignerFromAuthData
factory
getSigner
initialize
isValidSignature
removeWebAuthnP256R1Signer
29,493 (-43)
28,296 (-8,506)
6,311 (-1)
1,348 (-1)
774 (+44)
1,837 (+22)
29,923 (+44)
32,678 (-22)
26,802 (-1)
-0.15%
-23.11%
-0.02%
-0.07%
+6.03%
+1.21%
+0.15%
-0.07%
-0.00%
29,493 (-43)
29,319 (-35,164)
27,379 (-2)
3,056 (-1)
2,399 (+1,669)
5,246 (+431)
29,923 (+44)
184,454 (+4,050)
26,802 (-1)
-0.15%
-54.53%
-0.01%
-0.03%
+228.63%
+8.95%
+0.15%
+2.24%
-0.00%
29,493 (-43)
28,296 (-9,856)
30,796 (-2)
3,058 (-1)
774 (+44)
1,837 (+22)
29,923 (+44)
45,852 (-22)
26,802 (-1)
-0.15%
-25.83%
-0.01%
-0.03%
+6.03%
+1.21%
+0.15%
-0.05%
-0.00%
29,493 (-43)
104,591 (-65)
41,477 (-2)
3,058 (-1)
7,274 (+6,544)
12,337 (+22)
29,923 (+44)
632,537 (+24,407)
26,802 (-1)
-0.15%
-0.06%
-0.00%
-0.03%
+896.44%
+0.18%
+0.15%
+4.01%
-0.00%
256 (0)
269 (+264)
1,795 (0)
1,283 (0)
4 (+2)
11 (+2)
1 (0)
12 (0)
256 (0)
SmartAccount 2,642,256 (+377,889) addWebAuthnP256R1Signer
entryPoint
execute
executeBatch
factory
getNonce
getSigner
initialize
isValidSignature
removeWebAuthnP256R1Signer
webAuthnVerifier
552 (-43)
246 (-1)
714 (-6,150)
23,089 (+44)
396 (+44)
1,084 (+22)
1,450 (+22)
2,932 (+44)
682 (-22)
344 (-1)
279 (+22)
-7.23%
-0.40%
-89.60%
+0.19%
+12.50%
+2.07%
+1.54%
+1.52%
-3.13%
-0.29%
+8.56%
1,130 (-43)
246 (-1)
6,184 (-45,045)
33,704 (+44)
1,062 (+710)
3,334 (+22)
3,850 (+422)
108,668 (+2,039)
52,001 (-22)
487 (-1)
279 (+22)
-3.67%
-0.40%
-87.93%
+0.13%
+201.70%
+0.66%
+12.31%
+1.91%
-0.04%
-0.20%
+8.56%
552 (-43)
246 (-1)
714 (-55,744)
27,433 (+44)
396 (+44)
3,334 (+22)
1,450 (+22)
116,873 (+44)
5,208 (-22)
344 (-1)
279 (+22)
-7.23%
-0.40%
-98.74%
+0.16%
+12.50%
+0.66%
+1.54%
+0.04%
-0.42%
-0.29%
+8.56%
73,098 (-43)
246 (-1)
83,692 (-22)
56,171 (+44)
2,396 (+2,044)
5,584 (+22)
7,450 (+22)
116,873 (+44)
286,606 (-22)
18,844 (-1)
279 (+22)
-0.06%
-0.40%
-0.03%
+0.08%
+580.68%
+0.40%
+0.30%
+0.04%
-0.01%
-0.01%
+8.56%
259 (0)
518 (+5)
294 (+264)
8 (0)
3 (+1)
2 (0)
10 (+1)
46 (+9)
12 (0)
258 (0)
256 (0)
AccountFactory 1,409,804 (0) createAndInitAccount
initialize
10,809 (0)
2,629 (0)
0.00%
0.00%
44,163 (+5,768)
46,547 (+275)
+15.02%
+0.59%
16,309 (0)
48,107 (0)
0.00%
0.00%
227,965 (+44)
48,107 (0)
+0.02%
0.00%
296 (+9)
60 (+9)
TransparentUpgradeableProxy 835,009 (0) createAndInitAccount
exposed_deployAccount
getAddress
41,278 (0)
192,532 (+44)
5,523 (0)
0.00%
+0.02%
0.00%
74,135 (+5,783)
228,273 (+44)
11,797 (-17)
+8.46%
+0.02%
-0.14%
46,363 (0)
234,222 (+44)
12,906 (0)
0.00%
+0.02%
0.00%
258,434 (+44)
234,272 (+44)
12,924 (0)
+0.02%
+0.02%
0.00%
296 (+9)
14 (0)
1,842 (+9)
SmartAccountHarness 2,731,407 (+374,279) exposed_validateSignature
initialize
removeWebAuthnP256R1Signer
webAuthnVerifier
2,772 (-1)
116,873 (+44)
18,844 (-1)
236 (-21)
-0.04%
+0.04%
-0.01%
-8.17%
121,601 (-1)
116,873 (+44)
18,844 (-1)
236 (-21)
-0.00%
+0.04%
-0.01%
-8.17%
14,801 (-1)
116,873 (+44)
18,844 (-1)
236 (-21)
-0.01%
+0.04%
-0.01%
-8.17%
290,737 (-1)
116,873 (+44)
18,844 (-1)
236 (-21)
-0.00%
+0.04%
-0.01%
-8.17%
5 (0)
5 (0)
1 (0)
1 (0)
DumbERC721 1,348,138 (0) safeTransferFrom 59,378 (+23) +0.04% 59,378 (+23) +0.04% 59,378 (+23) +0.04% 59,378 (+23) +0.04% 1 (0)
DumbERC1155 1,420,746 (0) mint
safeTransferFrom
51,022 (0)
58,503 (+22)
0.00%
+0.04%
51,275 (+3)
58,503 (+22)
+0.01%
+0.04%
51,192 (0)
58,503 (+22)
0.00%
+0.04%
52,621 (+22)
58,503 (+22)
+0.04%
+0.04%
9 (0)
6 (0)
SmartAccountERC1271__EIP191 8,496,078 (+359,816)
SmartAccountERC1271__EIP712 8,523,122 (+359,816)
SmartAccount__ValidateCreationSignature 8,395,701 (+356,601)
SmartAccount__validateWebAuthnP256R1Signature 7,077,521 (+356,567)

qd-qd added 2 commits April 2, 2024 19:25
Implement the UUPS upgradeability pattern for the Account contract.
This commit also reorg account functions and rename the `VERSION`
function to `version` to be more consistent with the rest of system.
@qd-qd qd-qd force-pushed the account/upgradeability branch from bd6424c to 487574f Compare April 2, 2024 17:27
@qd-qd qd-qd marked this pull request as ready for review April 2, 2024 17:27
@qd-qd qd-qd merged commit 487574f into main Apr 2, 2024
4 checks passed
@qd-qd qd-qd deleted the account/upgradeability branch April 2, 2024 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant